<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../template/common.xhtml"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                    
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="title">
        Event List
    </ui:define>

    <ui:define name="pageheader">
        Event list
    </ui:define>
    <ui:define name="content">
        <h:form id="mainform">
            
            
            <h:dataTable styleClass="main-table" value="#{eventManager.listEvents}" var="s" width="100%" cellpadding="0" border="0">
                <h:column headerClass="table-header-check">
                    <f:facet name="header">
                        <h:commandLink id="toggle-all" styleClass="toggle-all"></h:commandLink>
                    </f:facet>                    
                    <h:selectBooleanCheckbox />
                </h:column>
                <h:column headerClass="table-header-repeat line-left minwidth-1">
                    <f:facet name="header">
                        <h:commandLink value="Name" />
                    </f:facet>
                    #{s.name}
                </h:column>
                <h:column headerClass="table-header-repeat line-left minwidth-1">
                    <f:facet name="header">
                        <h:commandLink value="Place" />
                    </f:facet>
                    #{s.place}
                </h:column>
                
                <h:column headerClass="table-header-options line-left">
                    <f:facet name="header">
                        <h:commandLink value="Start date" />
                    </f:facet>
                    #{s.startDate}
                </h:column>
                <h:column headerClass="table-header-options line-left">
                    <f:facet name="header">
                        <h:commandLink value="End date" />
                    </f:facet>
                    #{s.endDate}
                </h:column>
                <h:column headerClass="table-header-options line-left">
                    <f:facet name="header">
                        <h:commandLink value="Description" />
                    </f:facet>
                    #{s.description}
                </h:column>
                <h:column headerClass="table-header-options line-left">
                    <f:facet name="header">
                        <h:commandLink value="Options" />
                    </f:facet>
                    <h:commandLink title="Delete" action="#{eventManager.delete(s)}" class="icon-2 info-tooltip" />
                    <h:commandLink title="Edit1" action="#{eventManager.edit(s)}" class="icon-3 info-tooltip" />
<!--                    <h:commandLink title="Edit" class="icon-4 info-tooltip" />
                    <h:commandLink title="Edit" class="icon-5 info-tooltip" />-->
                </h:column>
            </h:dataTable>
        </h:form>
    </ui:define>
</ui:composition>
